//
//  HomeCallModel.m
//  xiuqu
//
//  Created by shuihulu02 on 2017/3/24.
//  Copyright © 2017年 ASASDA. All rights reserved.
//

#import "HomeCallModel.h"

@implementation HomeCallModel
- (id)initWithDict:(NSDictionary *)dict {
    if (self) {
        
        self.NickName       = dict[@"NickName"];
        self.AnchorId     = dict[@"AnchorId"];
        self.CallId     = dict[@"CallId"];
        self.UserId         = dict[@"UserId"];
        self.HeadImg        = dict[@"HeadImg"];
        self.AGradeIcon     = dict[@"AGradeIcon"];
        self.BGradeIcon     = dict[@"BGradeIcon"];
        self.HostCity       = dict[@"HostCity"];
        self.job            = dict[@"job"];
        self.LiveChatPrice  = [dict[@"LiveChatPrice"] floatValue];
        self.Age            = [dict[@"Age"] intValue];
        self.ChatStatus     = [dict[@"ChatStatus"] intValue];
        self.IsOneTimeCall  = [dict[@"IsOneTimeCall"] boolValue];
//        self.UserFreeSecond = [dict[@"UserFreeSecond"] intValue];
        self.UserCardSecond = [dict[@"UserCardSecond"] intValue];
        self.Minute =       [dict[@"Minute"] intValue];
        self.Id =       [dict[@"Id"] intValue];


    }
    return self;
}

- (void)encodeWithCoder:(NSCoder *)aCoder
{
    [aCoder encodeObject:self.NickName forKey:@"NickName"];
    [aCoder encodeObject:self.AnchorId forKey:@"AnchorId"];
    [aCoder encodeObject:self.CallId forKey:@"CallId"];
    [aCoder encodeObject:self.UserId forKey:@"UserId"];
    [aCoder encodeObject:self.HeadImg forKey:@"HeadImg"];
    [aCoder encodeObject:self.AGradeIcon forKey:@"AGradeIcon"];
    [aCoder encodeObject:self.BGradeIcon forKey:@"BGradeIcon"];
    [aCoder encodeObject:self.HostCity forKey:@"HostCity"];
    [aCoder encodeObject:self.job forKey:@"job"];
//    [aCoder encodeObject:self.LiveChatPrice forKey:@"LiveChatPrice"];
}

- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
    if (self = [super init]) {
        self.NickName = [aDecoder decodeObjectForKey:@"NickName"];
        self.AnchorId = [aDecoder decodeObjectForKey:@"AnchorId"];
        self.CallId = [aDecoder decodeObjectForKey:@"CallId"];
        self.UserId = [aDecoder decodeObjectForKey:@"UserId"];
        self.HeadImg = [aDecoder decodeObjectForKey:@"HeadImg"];
        self.AGradeIcon = [aDecoder decodeObjectForKey:@"AGradeIcon"];
        self.BGradeIcon = [aDecoder decodeObjectForKey:@"BGradeIcon"];
        self.HostCity = [aDecoder decodeObjectForKey:@"HostCity"];
        self.job = [aDecoder decodeObjectForKey:@"job"];
    }
    
    return self;
}

@end
